home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-06-17 | 529 b | 38 lines | [TEXT/CWIE] |
- // WaitLength.h
-
- #ifndef WaitLength_h
- #define WaitLength_h
-
- #ifndef Millisecs_h
- #include "Millisecs.h"
- #endif
- #ifndef Microsecs_h
- #include "Microsecs.h"
- #endif
- #ifndef Assert_h
- #include "Assert.h"
- #endif
-
- class WaitLength
- {
- private:
- int32 value;
-
- public:
- WaitLength( Millisecs time )
- : value( time.Count() )
- {
- Assert( time.Count() >= 0 );
- }
-
- WaitLength( Microsecs time )
- : value( -time.Count() )
- {
- Assert( time.Count() >= 0 );
- }
-
- int32 Value() const { return value; }
- };
-
- #endif
-